.class public Lcom/estrongs/android/widget/ControllableAppBarLayout;
.super Lcom/google/android/material/appbar/AppBarLayout;
.source "ControllableAppBarLayout.java"

# interfaces
.implements Lcom/google/android/material/appbar/AppBarLayout$OnOffsetChangedListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;,
        Lcom/estrongs/android/widget/ControllableAppBarLayout$State;,
        Lcom/estrongs/android/widget/ControllableAppBarLayout$b;
    }
.end annotation


# instance fields
.field private a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

.field private b:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference<",
            "Landroidx/coordinatorlayout/widget/CoordinatorLayout;",
            ">;"
        }
    .end annotation
.end field

.field private c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

.field private d:Z

.field private e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

.field private f:Lcom/estrongs/android/widget/ControllableAppBarLayout$b;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/google/android/material/appbar/AppBarLayout;-><init>(Landroid/content/Context;)V

    .line 2
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->NONE:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    .line 4
    invoke-direct {p0, p1, p2}, Lcom/google/android/material/appbar/AppBarLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 5
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->NONE:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    const/4 p1, 0x0

    .line 6
    iput-boolean p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d:Z

    return-void
.end method

.method private declared-synchronized b()V
    .locals 2

    monitor-enter p0

    .line 1
    :try_start_0
    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$a;->a:[I

    iget-object v1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I

    move-result v1

    aget v0, v0, v1

    const/4 v1, 0x1

    if-eq v0, v1, :cond_3

    const/4 v1, 0x2

    if-eq v0, v1, :cond_2

    const/4 v1, 0x3

    if-eq v0, v1, :cond_1

    const/4 v1, 0x4

    if-eq v0, v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e()V

    goto :goto_0

    .line 3
    :cond_1
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->f()V

    goto :goto_0

    .line 4
    :cond_2
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c()V

    goto :goto_0

    .line 5
    :cond_3
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d()V

    .line 6
    :goto_0
    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->NONE:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    iput-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 7
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private c()V
    .locals 8

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    move-object v2, v0

    check-cast v2, Landroidx/coordinatorlayout/widget/CoordinatorLayout;

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I

    move-result v0

    int-to-float v6, v0

    const/4 v7, 0x1

    move-object v3, p0

    invoke-virtual/range {v1 .. v7}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;->onNestedFling(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;FFZ)Z

    :cond_0
    return-void
.end method

.method private d()V
    .locals 8

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    move-object v2, v0

    check-cast v2, Landroidx/coordinatorlayout/widget/CoordinatorLayout;

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I

    move-result v6

    const/4 v0, 0x2

    new-array v7, v0, [I

    fill-array-data v7, :array_0

    move-object v3, p0

    invoke-virtual/range {v1 .. v7}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;->onNestedPreScroll(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;II[I)V

    :cond_0
    return-void

    :array_0
    .array-data 4
        0x0
        0x0
    .end array-data
.end method

.method private e()V
    .locals 8

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    move-object v2, v0

    check-cast v2, Landroidx/coordinatorlayout/widget/CoordinatorLayout;

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getHeight()I

    move-result v0

    neg-int v0, v0

    mul-int/lit8 v0, v0, 0x5

    int-to-float v6, v0

    const/4 v7, 0x0

    move-object v3, p0

    invoke-virtual/range {v1 .. v7}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;->onNestedFling(Landroidx/coordinatorlayout/widget/CoordinatorLayout;Landroid/view/View;Landroid/view/View;FFZ)Z

    :cond_0
    return-void
.end method

.method private f()V
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/google/android/material/appbar/AppBarLayout$Behavior;->setTopAndBottomOffset(I)Z

    :cond_0
    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-virtual {p0, v0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a(Z)V

    return-void
.end method

.method public a(Z)V
    .locals 0

    if-eqz p1, :cond_0

    .line 2
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->EXPAND_WITH_ANIMATION:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    goto :goto_0

    :cond_0
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->EXPAND:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    :goto_0
    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    .line 3
    invoke-virtual {p0}, Landroid/widget/LinearLayout;->requestLayout()V

    return-void
.end method

.method public getState()Lcom/estrongs/android/widget/ControllableAppBarLayout$State;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    return-object v0
.end method

.method protected onAttachedToWindow()V
    .locals 2

    .line 1
    invoke-super {p0}, Landroid/widget/LinearLayout;->onAttachedToWindow()V

    .line 2
    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    instance-of v0, v0, Landroidx/coordinatorlayout/widget/CoordinatorLayout$LayoutParams;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    instance-of v0, v0, Landroidx/coordinatorlayout/widget/CoordinatorLayout;

    if-eqz v0, :cond_0

    .line 4
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    check-cast v1, Landroidx/coordinatorlayout/widget/CoordinatorLayout;

    invoke-direct {v0, v1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b:Ljava/lang/ref/WeakReference;

    .line 5
    invoke-virtual {p0, p0}, Lcom/google/android/material/appbar/AppBarLayout;->addOnOffsetChangedListener(Lcom/google/android/material/appbar/AppBarLayout$OnOffsetChangedListener;)V

    return-void

    .line 6
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "ControllableAppBarLayout must be a direct child of CoordinatorLayout."

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 1

    .line 1
    invoke-super {p0, p1}, Landroid/widget/LinearLayout;->onDraw(Landroid/graphics/Canvas;)V

    .line 2
    iget-boolean p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d:Z

    if-nez p1, :cond_0

    const/4 p1, 0x1

    .line 3
    iput-boolean p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d:Z

    .line 4
    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->NONE:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    if-eq p1, v0, :cond_0

    .line 5
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b()V

    :cond_0
    return-void
.end method

.method protected onLayout(ZIIII)V
    .locals 0

    .line 1
    invoke-super/range {p0 .. p5}, Lcom/google/android/material/appbar/AppBarLayout;->onLayout(ZIIII)V

    sub-int/2addr p4, p2

    if-lez p4, :cond_0

    sub-int/2addr p5, p3

    if-lez p5, :cond_0

    .line 2
    iget-boolean p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->d:Z

    if-eqz p1, :cond_0

    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->c:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    sget-object p2, Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;->NONE:Lcom/estrongs/android/widget/ControllableAppBarLayout$ToolbarChange;

    if-eq p1, p2, :cond_0

    .line 3
    invoke-direct {p0}, Lcom/estrongs/android/widget/ControllableAppBarLayout;->b()V

    :cond_0
    return-void
.end method

.method protected onMeasure(II)V
    .locals 0

    .line 1
    invoke-super {p0, p1, p2}, Lcom/google/android/material/appbar/AppBarLayout;->onMeasure(II)V

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    if-nez p1, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object p1

    check-cast p1, Landroidx/coordinatorlayout/widget/CoordinatorLayout$LayoutParams;

    invoke-virtual {p1}, Landroidx/coordinatorlayout/widget/CoordinatorLayout$LayoutParams;->getBehavior()Landroidx/coordinatorlayout/widget/CoordinatorLayout$Behavior;

    move-result-object p1

    check-cast p1, Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->a:Lcom/google/android/material/appbar/AppBarLayout$Behavior;

    :cond_0
    return-void
.end method

.method public onOffsetChanged(Lcom/google/android/material/appbar/AppBarLayout;I)V
    .locals 1

    if-nez p2, :cond_1

    .line 1
    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->f:Lcom/estrongs/android/widget/ControllableAppBarLayout$b;

    if-eqz p1, :cond_0

    iget-object p2, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->EXPANDED:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    if-eq p2, v0, :cond_0

    .line 2
    invoke-interface {p1, v0}, Lcom/estrongs/android/widget/ControllableAppBarLayout$b;->a(Lcom/estrongs/android/widget/ControllableAppBarLayout$State;)V

    .line 3
    :cond_0
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->EXPANDED:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    goto :goto_0

    .line 4
    :cond_1
    invoke-static {p2}, Ljava/lang/Math;->abs(I)I

    move-result p2

    invoke-virtual {p1}, Lcom/google/android/material/appbar/AppBarLayout;->getTotalScrollRange()I

    move-result p1

    if-lt p2, p1, :cond_3

    .line 5
    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->f:Lcom/estrongs/android/widget/ControllableAppBarLayout$b;

    if-eqz p1, :cond_2

    iget-object p2, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->COLLAPSED:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    if-eq p2, v0, :cond_2

    .line 6
    invoke-interface {p1, v0}, Lcom/estrongs/android/widget/ControllableAppBarLayout$b;->a(Lcom/estrongs/android/widget/ControllableAppBarLayout$State;)V

    .line 7
    :cond_2
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->COLLAPSED:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    goto :goto_0

    .line 8
    :cond_3
    iget-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->f:Lcom/estrongs/android/widget/ControllableAppBarLayout$b;

    if-eqz p1, :cond_4

    iget-object p2, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    sget-object v0, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->IDLE:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    if-eq p2, v0, :cond_4

    .line 9
    invoke-interface {p1, v0}, Lcom/estrongs/android/widget/ControllableAppBarLayout$b;->a(Lcom/estrongs/android/widget/ControllableAppBarLayout$State;)V

    .line 10
    :cond_4
    sget-object p1, Lcom/estrongs/android/widget/ControllableAppBarLayout$State;->IDLE:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->e:Lcom/estrongs/android/widget/ControllableAppBarLayout$State;

    :goto_0
    return-void
.end method

.method public setOnStateChangeListener(Lcom/estrongs/android/widget/ControllableAppBarLayout$b;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/widget/ControllableAppBarLayout;->f:Lcom/estrongs/android/widget/ControllableAppBarLayout$b;

    return-void
.end method
